#include "abstractobject.h"

int AbstractObject::m_guids = 0;

AbstractObject::AbstractObject(QObject *parent)
    : QObject(parent)
{
    m_guid = m_guids++;
}

void AbstractObject::setParentObject(QPointer<AbstractObject> object)
{
    if(m_parentObject == object) return;
    m_parentObject = object;
    emit parentObjectChanged(m_parentObject);
}

void AbstractObject::setID(const QString &id)
{
    if(m_ID == id) return;
    m_ID = id;
    emit idChanged(m_ID);
}

QString AbstractObject::id() const
{
    return m_ID;
}

QPointer<AbstractObject> AbstractObject::parentObject() const
{
    return m_parentObject;
}

